import java.util.Arrays;
import java.util.Scanner;

public class Demo {
//    public static void main(String[] args) {
//        int[] array = {4,2,5,6,7,9,1,8,3,10};
//        int ret = findMinNumber(array);
//        System.out.println("minIndex = " + ret);
//    }
//    private static int findMinNumber(int[] array) {
//        int minIndex = 0;
//        for (int i = 1; i < array.length; i++) {
//            if(array[i] < array[minIndex])
//                minIndex = i;
//        }
//        return minIndex;
//    }


//    public static void main(String[] args) {
//        int[] array = {2,3,5,10,15,16,18,22,26,30,32,35,41,42,43,55,66,67,69,72,76,82,83,88};
//        int ret = find2(array, 44, 0, array.length - 1);
//        if(ret == -1) {
//            System.out.println("找不到这个值");
//        } else {
//            System.out.printf("找到了，44的下标为：%d",ret);
//        }
//    }

    private static int find2(int[] array, int target, int start, int end) {
        if(start > end) return -1;
        int mid = (start + end) / 2;
        if(array[mid] == target) return mid;
        else if(array[mid] > target) return find2(array, target, start, mid - 1);
        else return find2(array,target,mid + 1, end);
    }


    private static void find1(int[] array, int target) {
        int left = 0, right = array.length - 1;
        while (left <= right) {
            int mid = (left + right) / 2;
            if(array[mid] == target) {
                System.out.printf("找到了，%d的下标为：%d",target, mid);
                return;
            }
            else if(array[mid] > target) right = mid - 1;
            else left = mid + 1;
        }
        System.out.println("找不到这个值");
    }


//    public static void main(String[] args) {
//        Scanner in = new Scanner(System.in);
//        String str = in.nextLine();
//        str = str.trim();
//        int k = 0;
//        char[] arr = str.toCharArray();
//        String[] answer = new String[0];
//        for(int i = 0; i < arr.length; ) {
//            StringBuilder sb = new StringBuilder();
//            if(arr[i] == '"') i++;
//            while(i < arr.length && arr[i] != '"' && arr[i] != ' ') {
//                sb.append(arr[i++]);
//            }
//            Arrays.copyOf(answer, ++k);
//            answer[k-1] = sb.toString();
//            if(i >= arr.length) break;
//            if(arr[i] == '"') i++;
//            i++;
//        }
//        for(String tmp : answer) {
//            System.out.println(tmp);
//        }
//    }



    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] balls = new int[n];
        for(int i = 0; i < n; i++) balls[i] = in.nextInt();
        if(n == 1) {
            System.out.println(0);
            return;
        }

        Arrays.sort(balls);
        int left = 0, right = 1 , sum = balls[0], product = balls[0];
        while(right < balls.length) {
            sum += balls[right];
            product *= balls[right];
            if(sum > product) right++;
            else break;
        }
        int ret = 0;
        while(left <= right) {
            while(sum <= product) {
                sum -= balls[right];
                product /= balls[right--];
            }
            // 此时 sum 一定大于 product
            ret += right - left;
            sum -= balls[left];
            product /= balls[left++];
        }
        System.out.println(ret);
        System.out.println("========");

    }

    
    //HJ37 统计每个月兔子的总数
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m1 = 0, m2 = 0;
        for(int i = 1; i <= n; i++) {
            int tmp = m2;
            m2 += m1;
            if(i == 1) m1 = 1;
            else m1 = tmp;
        }
        System.out.println(m1 + m2);
    }



    public static void main4(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int a = in.nextInt();
            for(int i = 0; i < n; i++) {
                int b = in.nextInt();
                if(a >= b) a += b;
                else {
                    int x = b, y = a;
                    while(x % y != 0) {
                        int tmp = x % y;
                        x = y;
                        y = tmp;
                    }
                    a += y;
                }
            }
            System.out.println(a);
        }
    }





}
